template<int N>
struct Factorial {
    static const int value = N * Factorial<N - 1>::value;
};

// 基案例
template<>
struct Factorial<0> {
    static const int value = 1;
};

int main() {
    constexpr int fact5 = Factorial<5>::value; // 编译时计算5的阶乘
    return 0;
}